package com.baymax.study.tuLing.bio;

import java.io.*;

/**
 * Demo02_PrintTxt
 *
 * @author Baymax Gu
 * @since 2024-09-14
 */
public class Demo02_PrintTxt {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("d:\\mytemp\\hello.txt"));
        String lineMsg;
        int lineNum = 1;
        while ((lineMsg = br.readLine()) != null) {
            System.out.println((lineNum++) + ": " + lineMsg);
        }
        br.close();
    }
}
